package com.neusoft.neuiotms.dcom.service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.neusoft.bizcore.auth.common.bean.UserBean;
import com.neusoft.bizcore.web.support.Searchable;
import com.neusoft.neuiotms.dcom.dto.QuestionnaireFeedbackDTO;

public interface QuestionnaireFeedbackService {

    List<QuestionnaireFeedbackDTO> index(Searchable searchable, final UserBean userBean);

    Page<QuestionnaireFeedbackDTO> search(Pageable pageable, Searchable searchable, UserBean userBean);

    QuestionnaireFeedbackDTO create(QuestionnaireFeedbackDTO dto);

    QuestionnaireFeedbackDTO update(Long id, QuestionnaireFeedbackDTO dto);

    QuestionnaireFeedbackDTO details(Long id, final UserBean userBean);

    QuestionnaireFeedbackDTO detailsByTask(Long taskId, UserBean userBean);

    void delete(Long id);

    /**
     * 一线运维人员提交
     *
     * @param feedback
     * @return
     */
    boolean submit(Long id);

    /**
     * 一线组长回退
     *
     * @param feedback
     * @return
     */
    boolean rollback(Long id);

    Page<Map<String, Object>> report(Pageable pageable, final String groupCode, String username, String type,
            Date start, Date end);

    Workbook exportReport(final String groupCode, String username, String type, Date start, Date end);

    XWPFDocument export(Long id, UserBean userBean);
}
